package demo05.SimpleFactory;

/**
 * 生产披萨
 * */
public  class PizzaStore  {
	//简单工厂模式
	SimplePizzeFactory pizzeFactiry ;

	public PizzaStore(SimplePizzeFactory piz) {
		this.pizzeFactiry = piz;
		
	}
	//供生产调用的方法
	public Pizza orderPizza(String type) {
		Pizza pizza;
 
		pizza = pizzeFactiry.createPizza(type);//调用工厂方法
 
		pizza.prepare();
		pizza.bake();
		pizza.cut();
		pizza.box();

		return pizza;
	}
}
